﻿using Newtonsoft.Json;
using System;
using TestRabbitMQ;

namespace TaskClient
{
    public class TestService
    {
        public void PrintEvent(string Name)
        {
            Console.WriteLine(Name);
        }


        [Subscribe("Test")]
        public bool StartTest(string msg)
        {
            Console.WriteLine($"收到订阅消息:{msg}");
            return true;
        }

        [Subscribe("TestModel")]
        public bool StartTestTwo(TestModel test)
        {
            Console.WriteLine($"收到订阅消息:{JsonConvert.SerializeObject(test)}");
            return true;
        }
    }

}
